#define _CRT_SECURE_NO_WARNINGS 1
#include "MySeqList.h"

void Test1()
{
	SL sl;
	SeqListInit(&sl);
	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 3);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);

	SeqListPrint(&sl);
	//SeqListPopBack(&sl);
	//SeqListPopBack(&sl);
	//SeqListPopBack(&sl);
	//SeqListPopBack(&sl);
	//SeqListPopBack(&sl);
	//SeqListPopBack(&sl);
	SeqListPopFront(&sl);
	SeqListPopFront(&sl);
	SeqListPopFront(&sl);
	SeqListPopFront(&sl);
	SeqListPopFront(&sl);

	SeqListPrint(&sl);


	SeqListPushFront(&sl, 1);
	SeqListPushFront(&sl, 2);
	SeqListPushFront(&sl, 3);
	SeqListPushFront(&sl, 4);
	SeqListPushFront(&sl, 5);
	int ret = SeqListFind(&sl,3);
	printf("%d\n", ret);


	SeqListPrint(&sl);

	SeqListDestroy(&sl);
}

void Test2()
{
	SL sl;
	SeqListInit(&sl);

	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 3);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);
	SeqListPrint(&sl);

	SeqListInsert(&sl, 2, 10);

	SeqListPrint(&sl);

	SeqListDelet(&sl, 1);
	SeqListPrint(&sl);

	SeqListDelet(&sl, 2);
	SeqListPrint(&sl);

	SeqListDelet(&sl, 3);
	SeqListPrint(&sl);


	SeqListDestroy(&sl);
}
int main()
{
	//Test1();
	Test2();

	return 0;
}